const express = require('express')
const Mock = require('mockjs');
const app = express()
const port = 3000

const obj = {};
const list = [];
let num = 20;
for(let i = 0;i < 204;i++){
  obj['item_'+i] = Mock.mock("@cword(10)");
}
for(let i = 0;i < num;i++){
  list.push(obj);
}
const listStr = JSON.stringify(list);

app.get('/', (req, res) => {
  res.append('Access-Control-Allow-Origin', '*');
  res.send(listStr)
})

app.listen(port, () => {
  console.log(`Example app listening at http://localhost:${port}`)
})
